package cn.frank.framework.caesar.module.ai.qwen.conf.filter;

import jakarta.servlet.Filter;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @description: TODO
 * @author: renjiangyang
 * @date 2025/6/5 9:39:43
 * @since 1.8
 */
@Configuration
public class FilterConfig {

    @Bean
    public FilterRegistrationBean<Filter> loggingFilter() {
        FilterRegistrationBean<Filter> registrationBean = new FilterRegistrationBean<>();
        registrationBean.setFilter(new RequestIdFilter());
        registrationBean.addUrlPatterns("/*");
        return registrationBean;
    }

    // @Bean
    // public RequestIdFilter loggingFilter() {
    //     return new RequestIdFilter();
    // }
}